<?php
/**
 * beimuaihui System
 * Copyright(c) 2011-2020 beimuaihui.
 * @license    http://www.gnu.org/licenses/gpl.html     This software Under GPL V3 License 
 * beimuaihui@gmail.com
 * http://code.google.com/p/beimuaihui/
 * $Id: User.php 197 2011-02-18 12:45:33Z beimuaihui $
 */


/*
 * SELECT * FROM store_questions a WHERE a.qid=121 OR a.parent_qid=121;
SELECT * FROM store_question_attributes d WHERE d.qid=121;
SELECT * FROM store_answers d WHERE d.qid=121;
SELECT * FROM store_survey_37628 b WHERE b.;

SELECT * FROM store_tokens_37628 e WHERE e.
;
SELECT * FROM store_survey_37628 b JOIN store_tokens_37628 c ON b.token=c.token


SELECT * FROM store_quota
 */
//class Permission extends Baogg_Db_Table {
class Joomla15_Content  extends Baogg_Db_Table_Slave {
	/**
	 * The default table name 
	 */
	protected $_name;
	protected $_db ;
	protected $_primary; 
	
	function __construct() {
		$this->_name =   'content';
		
		$this->primary= $this->_primary='id';
		parent::__construct();
	}
	
	function getSameRow($row=array()){
		if(!$row || !is_array($row) || !$row['title'] || !$row['introtext'] || !$row['catid'] ){
			return true;
		}
		$rs=$this->getList(array('catid='.$row['catid'],"title='{$row['title']}'"));
		return $rs?true:false;
	}
}